package rolesystem.middle.utilityclasses;

import java.util.Comparator;


public class AgentData 
{
	public int id;
	public int role_id;
	public PositionSq position_agent;
	public int distance_to=0; // used to compare distances between agents
	
	public AgentData()
	{
		this.id=0;
		this.position_agent=new PositionSq(0,0);
		this.role_id=0;
		this.distance_to=0;
	}
	
	public AgentData(int id)
	{
		this.id=id;
		this.position_agent=new PositionSq(0,0);
		this.role_id=0;
		this.distance_to=0;
	}
	
	public AgentData(int id, PositionSq position_agent)
	{
		this.id=id;
		this.position_agent=position_agent;
	}

	public AgentData(AgentData agentData)
	{
		this.id=agentData.id;
		this.position_agent=agentData.position_agent;
		this.role_id=agentData.role_id;
		this.distance_to=agentData.distance_to;
	}
	
	
}

class AgentDataComparator implements Comparator<AgentData> 
{
    public int compare(AgentData agentData1, AgentData agentdata2) 
    {
        return agentData1.distance_to - agentdata2.distance_to;
    }
}